home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / rbsetnv1.zip / README < prev    next >
Text File  |  1991-01-03  |  3KB  |  55 lines

  1. These are a couple of small utilities designed to add some flexibility in
  2. preparing arguments to commands and setting of environment variables
  3. in the MSDOS command.com shell.  They are also useful under
  4. 4DOS, although they are not so neccessary there.
  5.  
  6. Eval runs any named command, after wildcard filename expansion,
  7. command substitution, and environment variable substitution.  
  8. Since the named command is a sub-process of "eval", setting of environment
  9. variables will not be useful.
  10.  
  11. Setenv sets an environment variable into the parent environment, after
  12. performing the same substitutions as above.  It can be used to
  13. capture the output of any program which writes to stdout.  Setenv can
  14. produce environment variables longer than the MSDOS 127 character
  15. command line limit, since the expansion is performed internally.
  16.  
  17. As examples of using setenv in collaboration with simple programs
  18. that write to stdout, the following are included:
  19.   addpath: add a specified directory to the end of the current path
  20.   inspath: insert a specified directory into the current path
  21.   delpath: delete a specified directory from the current path
  22.   chgpath: change a specified directory into something else.
  23. e.g.
  24.   setenv PATH `addpath \new\directory`
  25.  
  26. As examples of using the environment setting routines directly, the
  27. following are included:
  28.   incr:    increment an integer valued environment variable directly
  29.   uprompt: set the variable PROMPT to the current directory, (with forward
  30.            slashes instead of backslashes)
  31.  
  32. Notes: 
  33. Command.com  4.01 SET command does not work properly when the
  34. strings get too long.  The environment is correct, and is displayed
  35. correctly by other programs which read it.  It seems that COMMAND
  36. assumes the strings cannot be more than 127 characters.  I don't know about
  37. earlier versions.
  38.  
  39. 4dos uses backquotes for it's own parsing, so you must protect the
  40. command substitutions with enclosing double quotes.
  41.  
  42. ms_sh (bourne shell clone) does not really need this utility, but if
  43. you use it, it changes what DOS considers to be the environment.
  44. However this is NOT what sh passes on to child processes so it will
  45. not do you much good.
  46.  
  47. Temporary files used for command substitution are all placed in a
  48. directory pointed to by %TMP (if set).  Considerable speed increase
  49. can be gained by making this a RAMdisk.  Also, copying the shell
  50. there and pointing %COMSPEC at it will speed things up.
  51.  
  52. These programs (source code and binaries) are placed in the public domain.
  53.  
  54. R. Brittain  10/19/90
  55.